package com.example.forum.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@ApiModel("用户信息")
@Data
public class User {
    private Long id;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("姓名")
    private String user_name;

    @JsonIgnore
    @ApiModelProperty("密码")
    private String password;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("昵称")
    private String nickname;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("电话号")
    private String phone_number;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("邮箱")
    private String email;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("性别")
    private Integer gender;

    @JsonIgnore
    @ApiModelProperty("盐值")
    private String salt;


    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("用户头像地址")
    private String avatar_url;

    @ApiModelProperty("是否是管理员,1-管理员，2-用户")
    private Integer is_admin;

    @ApiModelProperty("发帖数量")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Integer article_count;


    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("个人简介")
    private String remark;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("用户状态")
    private Integer state;

    @JsonIgnore
    @ApiModelProperty("是否删除")
    private Integer delete_state;

    @ApiModelProperty("注册日期")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Date create_time;

    @ApiModelProperty("更新时间")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Date update_time;


}